-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add github app #1070
feat: add github app #1070
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1070 +/- ##
===========================================
+ Coverage 52.15% 62.22% +10.07%
===========================================
Files 550 345 -205
Lines 18833 10309 -8524
===========================================
- Hits 9822 6415 -3407
+ Misses 8447 3416 -5031
+ Partials 564 478 -86
|
scm/github/github.go
Outdated
@@ -164,3 +184,40 @@ | |||
|
|||
return github | |||
} | |||
|
|||
// helper function to return the GitHub App token. | |||
func (c *client) newGithubAppToken(r *library.Repo) *github.Client { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
func (*client).newGithubAppToken
is unused (unused)
// CreateChecks defines a function that does stuff... | ||
func (c *client) CreateChecks(ctx context.Context, r *library.Repo, s *library.Step, branch string) (int64, error) { | ||
// create client from GitHub App | ||
client := c.newGithubAppToken(r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
Function newGithubAppToken->newClientToken
should pass the context parameter (contextcheck)
// UpdateChecks defines a function that does stuff... | ||
func (c *client) UpdateChecks(ctx context.Context, r *library.Repo, s *library.Step, id int64, branch string) error { | ||
// create client from GitHub App | ||
client := c.newGithubAppToken(r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
Function newGithubAppToken->newClientToken
should pass the context parameter (contextcheck)
} | ||
|
||
// TODO: have to store the check ID somewhere | ||
s.SetCheckID(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
s.SetCheckID undefined (type *library.Step has no field or method SetCheckID) (typecheck)
api/step/plan.go
Outdated
|
||
// TODO: have to store the check ID somewhere | ||
s.SetCheckID(id) | ||
|
||
// send API call to create the step | ||
s, err := database.CreateStep(ctx, s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
no new variables on left side of := (typecheck)
Status: github.String(status), | ||
} | ||
|
||
_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID)) (typecheck)
Status: github.String(status), | ||
} | ||
|
||
_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID)) (typecheck)
Status: github.String(status), | ||
} | ||
|
||
_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID)) (typecheck)
Status: github.String(status), | ||
} | ||
|
||
_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID) (typecheck)
closing this PR in favor #1217 |
No description provided.